package com.lijian.service;

import com.lijian.pojo.Blog;
import com.lijian.vo.BlogVO;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;

public interface BlogService {

    Blog findBlogById(Long id);

    Page<Blog> listBlog(Pageable pageable, BlogVO blog);

    Page<Blog> listBlog(Pageable pageable);

    Page<Blog> listBlog(String query, Pageable pageable);

    Blog addBlog(Blog blog);

    Blog updateBlog(Long id, Blog blog);

    void deleteBlog(Long id);

    List<Blog> listRecommendBlogTop(Integer size);

    /**
     *查询博客，转换成Markdown
     * @param id
     * @return
     */
    Blog findBlogAndMarkdownToHtml(Long id);

    Page<Blog> listBlog(Long tagId, Pageable pageable);

    Map<String, List<Blog>> archiveBlog();

    Long countBlog();
}
